package com.ershi.spring.aop.annotation;

import com.ershi.spring.aop.annotation.config.SpringAopConfig;
import com.ershi.spring.aop.annotation.service.Add;
import com.ershi.spring.aop.annotation.service.AddImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author 二十
 * @since 2021/10/18 12:11 上午
 * Aop相关功能测试
 */
public class AopMain {

	public static void main(String[] args) {
		ApplicationContext ioc = new AnnotationConfigApplicationContext(SpringAopConfig.class);

		Add add = ioc.getBean(Add.class);
		add.add(1,1);
		System.out.println("add.del(1,2) = " + add.del(1, 2));
	}
}
